import config from "@/config"
import http from "@/utils/request"
/**
 * 公告
 */
export default {
  getNoticeList: {
    url: `${config.API_URL}/announcement/list`,
    name: "获取公告列表",
    get: async function (data = {}) {
      return await http.get(this.url, data)
    }
  },

  getLatestNotice: {
    url: `${config.API_URL}/announcement/getLatest`,
    name: "获取最新公告",
    post: async function (data = {}) {
      return await http.post(this.url, data)
    }
  },

  addNotice: {
    url: `${config.API_URL}/announcement/add`,
    name: "添加公告",
    post: async function (data = {}) {
      return await http.post(this.url, data)
    }
  },

  delelteNotice: {
    url: `${config.API_URL}/announcement/delelte`,
    name: "删除公告",
    post: async function (data = {}) {
      return await http.postParam(this.url, data)
    }
  },

  isDisableNotice: {
    url: `${config.API_URL}/announcement/disable`,
    name: "启用禁用公告",
    post: async function (data = {}) {
      return await http.postParam(this.url, data)
    }
  },

}